<?php
require_once('model/Controller.php');

class Controller extends DataObjects_Controller 
{
	public static function getList(){
		$control = new Controller();
		$control->orderBy('order_index');
		$control->find();
		
		return $control;
	}
	
	/**
	 * Enter description here...
	 *
	 * @param unknown_type $contr
	 * @return Controller object
	 */
	
	public static function getCurrent($contr = null){
		
		if (!$contr){
			$contr = FRM_Request::getController();
        	$contr = substr($contr, strpos($contr, '_') + 1);         	
		}
		
        $controller = new Controller();
        $controller->value = $contr;
        $controller->find();
        
        $controller->fetch();
        
        return $controller;
	}
	
	public static function getContentController($contr='home'){
		$controller = new Controller();
        $controller->value = $contr;
        $controller->find();
        
        $controller->fetch();
        
        return $controller->content;
	}
}
?>
